<template>
	<el-card class="form-container">
		<el-form :model="editForm" ref="editForm" :rules="dataRule" @keyup.enter.native="dataFormSubmitHandle()" label-width="90px">
			<el-form-item label="品牌名称" prop="brandName">
				<el-input v-model="editForm.brandName" placeholder="请输入品牌名称"></el-input>
			</el-form-item>
			<el-form-item label="品牌图片:存储图片路径" prop="brandImageUrl">
				<el-input v-model="editForm.brandImageUrl" placeholder="请输入品牌图片:存储图片路径"></el-input>
			</el-form-item>
			<el-form-item label="品牌首字母" prop="brandAcronym">
				<el-input v-model="editForm.brandAcronym" placeholder="请输入品牌首字母"></el-input>
			</el-form-item>
			<el-form-item label="品牌排序" prop="brandSort">
				<el-input v-model="editForm.brandSort" placeholder="请输入品牌排序"></el-input>
			</el-form-item>
			<el-form-item label="状态 1.启用 2.禁用" prop="brandStatus">
				<el-input v-model="editForm.brandStatus" placeholder="请输入状态 1.启用 2.禁用"></el-input>
			</el-form-item>
			<el-form-item label="创建时间" prop="createTime">
				<el-input v-model="editForm.createTime" placeholder="请输入创建时间"></el-input>
			</el-form-item>
			<el-form-item label="修改时间" prop="updateTime">
				<el-input v-model="editForm.updateTime" placeholder="请输入修改时间"></el-input>
			</el-form-item>
			<el-form-item label="品牌编号" prop="brandCode">
				<el-input v-model="editForm.brandCode" placeholder="请输入品牌编号"></el-input>
			</el-form-item>
			<el-form-item>
				<el-button @click="cancel">取消</el-button>
				<el-button type="primary" @click="submit('dataForm')">确定</el-button>
			</el-form-item>
		</el-form>
	</el-card>
</template>

<script>
	import { findGoodsBrandDetail } from '@/api/mall/goodsBrand'
	export default {
		name: 'user-goodsBrand',
		data() {
			return {
				editForm: {
					brandName: '',
					brandImageUrl: '',
					brandAcronym: '',
					brandSort: '',
					brandStatus: '',
					createTime: '',
					updateTime: '',
					brandCode: '',
				}
			}
		},
		created() {
			this.editForm.id = this.$route.query.id
			this.view(this.$route.query.id)
		},
		methods: {
			view(val) {
				findGoodsBrandDetail(val).then(res => {
					this.editForm = res.data.responseData
				})
			},
			cancel() {
				this.$router.go(-1)
			},
			update() {

			}
		}
	}
</script>

<style>
</style>
